# This runs main.

require 'fileutils'

output = "main_output.txt"
File.unlink(output) if File.exist?(output)
rval = %x{qsub main_test.sh -o #{output} }
puts "running main_test.sh"
while !File.exist?(output)
  sleep(0.1)
end
text = File.open(output, "r")  { |f| f.read }
puts text
File.unlink(output)

